import request from '@/utils/request'

export function getQuote(code) {
  return request({
    url: '/api/quotes/code/' + code,
    method: 'get'
  })
}

export function getQuoteOrder(id) {
  return request({
    url: '/api/user/quoteOrders/' + id,
    method: 'get'
  })
}

export function uploadFile(data) {
  return request({
    url: '/api/files',
    headers: { 'Content-Type': 'multipart/form-data' },
    method: 'post',
    data
  })
}

export function postQuoteOrder(data) {
  return request({
    url: '/api/quoteOrders',
    method: 'post',
    data
  })
}

export function payQuoteOrder(id, data) {
  return request({
    url: '/api/quoteOrders/' + id + '/pay',
    method: 'post',
    data
  })
}

